﻿
namespace CID.Support.BinaryContentConverters
{
    /// <summary>
    /// Defines an interface for common implementation of the binary content conversion to and from a string representation
    /// </summary>
    public interface IBinaryContentConverter
    {
        /// <summary>
        /// Converts the binary content into a string representation
        /// </summary>
        /// <param name="content">The binary content to be converted</param>
        /// <returns>A string that represents the <see cref="content"/> value</returns>
        string ToString(byte[] content);

        /// <summary>
        /// Converts a string representation back to binary content
        /// </summary>
        /// <param name="contentStringRepresentation">A string that represents a binary content</param>
        /// <returns>The binary content represented by <see cref="contentStringRepresentation"/></returns>
        byte[] ToBinaryContent(string contentStringRepresentation);
    }
}
